using RAG.Application.Dtos;
using RAG.Application.Commands;

namespace RAG.Application.Interfaces;

/// <summary>
/// 用户服务接口
/// </summary>
public interface IAppUserService
{
    /// <summary>
    /// 获取用户列表（分页）
    /// </summary>
    Task<ApiResult> GetUsersAsync(int page, int size, string? search = null);

    /// <summary>
    /// 根据ID获取用户详情
    /// </summary>
    Task<ApiResult> GetUserByIdAsync(Guid userId);

    /// <summary>
    /// 获取用户角色
    /// </summary>
    Task<ApiResult> GetUserRolesAsync(Guid userId);

    /// <summary>
    /// 获取用户角色信息（详细）
    /// </summary>
    Task<ApiResult> GetUserRolesInfoAsync(Guid userId);

    /// <summary>
    /// 创建用户
    /// </summary>
    Task<ApiResult> CreateUserAsync(CreateUserDto dto);

    /// <summary>
    /// 更新用户
    /// </summary>
    Task<ApiResult> UpdateUserAsync(Guid userId, UpdateUserDto dto);

    /// <summary>
    /// 删除用户
    /// </summary>
    Task<ApiResult> DeleteUserAsync(Guid userId, Guid currentUserId);

    /// <summary>
    /// 修改密码
    /// </summary>
    Task<ApiResult> ChangePasswordAsync(Guid userId, ChangePasswordDto dto, Guid currentUserId);

    /// <summary>
    /// 启用用户
    /// </summary>
    Task<ApiResult> EnableUserAsync(Guid userId, Guid currentUserId);

    /// <summary>
    /// 禁用用户
    /// </summary>
    Task<ApiResult> DisableUserAsync(Guid userId, Guid currentUserId);

    /// <summary>
    /// 分配角色
    /// </summary>
    Task<ApiResult> AssignRolesAsync(Guid userId, AssignRolesDto dto, Guid currentUserId);
} 